<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page import="net.tribal.comic.entities.User" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="title.user.edit.password.nav"/></title>
    </head>
    
    <body>
	    <div class="navButtonsTop rounded-corners">
			<h1 class="title"><g:message code="title.user.edit.password" args="[userInstance.alias]"/></h1>
		</div>
        
        <g:uploadForm>
        	<div class="element rounded-corners">
		        <g:hasErrors bean="${userInstance}">
		        	<div class="errors rounded-corners"><g:renderErrors bean="${userInstance}" as="list" /></div>
				</g:hasErrors>
		
				<div class="tableCreate">
   					<table>
       					<tbody>
           					<tr>
			                	<td class="name">
			                    	<label for="password"><g:message code="default.label.password"/>:</label>
			                    </td>
			                    <td class="requiredField value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
			                        <g:passwordField name="password"/>
			                    </td>
			                </tr>
			                <tr>
			                    <td class="name">
			                        <label for="repeatPassword"><g:message code="default.label.repeatPassword"/>:</label>
			                    </td>
			                    <td class="requiredField value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
					            	<g:passwordField name="repeatPassword"/>
					        	</td>
					    	</tr>
						</tbody>
					</table>
				</div>
			</div>
			
			<div class="navButtons rounded-corners">
				<div class="left">
	        		<g:actionSubmit class="save" action="updatePassword" value="${message(code:'default.button.update')}" />
	        	</div>
	        	<div class="right">
	        		<g:actionSubmit class="show" action="show" value="${message(code:'default.button.back')}" />
	        	</div>
	    	</div>

			<g:hiddenField name="id" value="${userInstance?.id}" />
			<g:hiddenField name="version" value="${userInstance?.version}" />
		</g:uploadForm>
	</body>
</html>